import {DetailStyle} from './style'
import { TextareaItem, Button } from 'antd-mobile';
import {useLocation} from 'react-router-dom'

import Header from '@/components/Header'


//列表的每一项
import ListItem from './item'

const Detail = ({match}) => {
  const location = useLocation()
  const data = location.state
  console.log(data);
  return (
    <DetailStyle>
      <Header title={data.title}/>
        <div className="pro_img">
          <img alt="促销活动：拼多多地摊致富经" src={data.img} width="100%" />  
        </div>
        <div className="pro_title">
          <div className="n-font">{data.subtitle}</div>
          <p className="cr">书摊鲁老师</p>
        </div>
        <div className="goods-detail-box">
          <p>
          拼多多目前已经针对个体创业者启动了专项选品补贴，包括便携椅、收款牌、货架等商品均享受了平台大规模补贴，除此之外，还有大量适宜夜市售卖的工厂好货、产地农产品等优质货源正在陆续上线。今天小编为大家带来的 是书摊鲁老师系列的各种书籍，《高手从来不拔刀》9.9元，《三十六计》3.5元，《企业合理节税避税》35.8元，爆款单品，优惠多多，快来抢购吧。
          </p>
          <p>
            <a href="">
              <img alt="" src="http://shihuo.hupucdn.com/ucditor/20200805/600x396_1ee725fa766a30ba6c52fc880ad81b67.png?imageView2/2/w/700/interlace/1%7cimageMogr2/format/jpg"/>
            </a>
          </p>
        </div>
        <div className="goods-detail">
          <div className="title">

          </div>
          {/* {
            <ListItem></ListItem>
          } */}
        </div>
        <div className="comment">
          <h5>评论</h5>
          <TextareaItem
            placeholder="发表你的意见..."
            data-seed="logId"
            rows= '3'
            autoHeight />
            <Button inline style={{backgroundColor:"#FF4338",color:"white", float:"right", width:"64px",lineHeight:"28px", height:"25px",fontSize:"14px"}}>发表</Button>
        </div>
        <div className="comment-newest">
          <h2 className="tit"><span>最新评论<i>(0)</i></span></h2>
          <p className="null show"> 亲，快来抢沙发哦</p>
        </div>
        <div className="footer">
          <div className="bottom-title">
            <ul>
              <li><a href="">登录</a></li>
              <li><a href="">注册</a></li>
              <li><a href="">客户端</a></li>
              <li><a href="">电脑版</a></li>
            </ul>
          </div>
          <p>Copyright © 2006-2016</p>
        </div>
        <div className="footer-fix">
          <div>
            <a href="javascript:void(0);">
              <div className="icon"></div>
              <p className="txt">分享</p>
            </a>
          </div>
          <Button inline style={{backgroundColor:"#FF4338",color:"white", width:"83px",lineHeight:"33px", height:"30px",fontSize:"14px"}}>去购买</Button>
        </div>
      </DetailStyle>
  );
}

export default Detail;
